package me.keiwu.pub.rpc;

import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by kei on 21/11/2017.
 */
public interface ConfigRpcPub {


    @RequestMapping("/rpc/config/get")
    String getConfig(@RequestParam("configType") Integer configType);

    @RequestMapping("/rpc/config/get/all")
    String getAllConfig();


    @Component
    class Hystrix implements ConfigRpcPub {

        @Override
        public String getConfig(Integer configType) {
            return "get config: service找不到!";
        }

        public String getAllConfig() {
            return "get all config: service找不到!";
        }

    }

}
